<?php /* Learn more: http://codex.wordpress.org/Template_Hierarchy */ ?>
<?php get_header();?>


<div id="slide"><div>
	<div class="image"><div class="onebg"></div></div>
	<p><strong>Blogger is a free blog service of Google that you can use to create a beautiful website or blog.</strong></p>
	<p><strong>Bloggeritems.com</strong> is the biggest Blogger community, where sharing thousands of widgets, themes and many amazing things for your Blogger site.</p>
	<p class="join">Ready to join Blogger? <a class="btn-org" href="<?php echo esc_url(home_url()); ?>/getting-started">Getting started</a></p>
</div><div class="clear"></div></div>
<?php if (is_user_logged_in()) : ?>
	<div id="logged">
	<?php 
	$user_id      = get_current_user_id();
	$current_user = wp_get_current_user();
	$profile_edit  = get_edit_profile_url( $user_id );
	$profile_page  = get_author_posts_url( $user_id );
	$avatar = get_avatar( $user_id, 96 );
	?>
	<div class="author">
	<?php echo $avatar; ?>
	<span class="welcome">Yeah, welcome</span>
	<span class="name"><?php echo $current_user->display_name;?></span>
	</div> 
	<div class="guide">After login, you will see your admin bar is on the top the site. Please use it to add new items, modify profile and other actions</div>
	<div class="redirect">
		<a href="<?php echo $profile_edit;?>">Edit profile</a><span>.</span>
		<a href="<?php echo $profile_page;?>">View personal page</a>
	</div>
	
	</div>
<?php else : ?>
	<div id="connect">
		<div class="external">
			<div class="onebg"></div>	
			<div id="ads_1_336_280" class="ads">
			<a href=""><span>Add your ads 336x280</span></a>
			<!-- <a href=""><img src=""/></a>
			 -->
			</div>
		</div>
		
		<div class="internal">
			<div class="onebg"></div>
			<div class="login">
				<?php wp_login_form(); ?>
			</div>
			<div class="register">
				<span>Not a member?</span>
				<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post">
					<p>
						<label for="user_register"><?php _e('Username') ?><br />
						<input type="text" name="user_login" id="user_register" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="101" /></label>
					</p>
					<p>
						<label for="user_email"><?php _e('E-mail') ?><br />
						<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" tabindex="102" /></label>
					</p>
					<?php do_action('register_form'); ?>
					<p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
					<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
					<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Register'); ?>" tabindex="103" /></p>
				</form>
			</div>			
		</div>
		
	</div>
	<div class="clear"></div>
	<div id="ads_2_468_60" class="ads">
		<a href=""><span>Add your ads 468x60</span></a>
		<a href=""><span>Add your ads 468x60</span></a>
		<!-- 
		<a href=""><img src=""/></a>		
		<a href=""><img src=""/></a>
		 -->		
	</div>
<?php endif; ?>


<?php get_footer(); ?>